<template>
  <div class="like">
    <div class="like-top">
      <img src="../../../../static/img/like.png" /> 猜你喜欢
    </div>
    <ul >
      <li class="like-item border-bottom" v-for="item in likeList" :key="item.id" @click="toDetails">
        <div class="like-img">
          <img :src="item.url" />
        </div>
        <div class="like-text">
          <div class="like-title">{{item.title}}</div>
          <div class="like-message">{{item.message}}</div>
          <div class="like-map">
            <span class="like-price">￥<b>{{item.price}}</b></span>起
            <span class="like-item-map">{{item.map}}</span>
          </div>
        </div>
      </li>

    </ul>
  </div>
</template>

<script>
  export default{
    props:['likeList'],
    data(){
      return{
      }
    },
    methods:{
      toDetails(){
        this.$router.push('/detail')
      }
    }
  }
</script>

<style>
  .like {
    margin-top: .2rem;
    font-size: .28rem;
    background-color: #fff;
    padding: 0 .2rem;
  }

  .like-top {
    padding: .2rem 0;
    font-size: .32rem;
  }

  .like-top img {
    width: .3rem;
    height: .3rem;
  }

  .like-item {
    padding: .2rem 0;
    position: relative;
    overflow: hidden;
  }

  .like-img {
    float: left;
  }

  .like-item img {
    width: 2rem;
    height: 2rem;
  }

  .like-text {
    padding-left: .22rem;
    overflow: hidden;
  }
  .like-title{
    font-size: .36rem;
    color: #212121;
    margin-top: .35rem;
  }
  .like-message{
    margin-top: .3rem;
    color: #616161;
    font-size: .24rem;
  }
  .like-map{
    margin-top: .3rem;
    color: #616161;
    position: relative;
  }
  .like-price{
    color: #ff8300;
  }
  .like-price b{
    font-size: .45rem;
  }
  .like-item-map{
    position: absolute;
    font-size: .24rem;
    right: 0;
    top: .17rem;
  }
</style>
